$\forall$$T$:Type, $g$:Top, $L$:($T$ List), $f$:(\{$x$:$T$$\mid$ ($x$ $\in$ $L$)\} $\rightarrow$(Top + Top)). \\[0ex]concat(map($\lambda$$x$.map($\lambda$$y$.$g$($x$,$y$);case $f$($x$) of inl($m$) =$>$ [$m$] $\mid$ inr($x$) =$>$ []);$L$)) \\[0ex]$\sim$ \\[0ex]mapfilter($\lambda$$x$.$g$($x$,outl($f$($x$)));$\lambda$$x$.isl($f$($x$));$L$)